package teams;

import formationStrategies.FormationStrategy;

/**
 * Representa al Tecnico de un Equipo
 */
public class Coach implements Nameable {

    private String name;

    private FormationStrategy formationStrategy;

    private Integer id;

    /**
     * Constructor de Tecnico que incluye su Nombre y su Estrategia de Formacion
     * 
     * @param name
     *            : Nombre del Tecnico
     * @param formationStrategy
     *            : Estrategia de Formacion del Tecnico
     */
    public Coach(final String name, final FormationStrategy formationStrategy) {
        this.name = name;
        this.formationStrategy = formationStrategy;
    }

    protected Coach() {

    }

    public Formation buildFormation(final Team team) {
        return this.getFormationStrategy().buildFormation(team);
    }

    @Override
    public String getName() {
        return this.name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public FormationStrategy getFormationStrategy() {
        return this.formationStrategy;
    }

    public void setFormationStrategy(final FormationStrategy formationStrategy) {
        this.formationStrategy = formationStrategy;
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(final Integer id) {
        this.id = id;
    }

}
